www.gusucode.com > 串口测试程序,用于调试rs485接口 串口通信的程序 > 串口测试程序,用于调试rs485接口 串口通信的程序/commtest/EditHex.cpp
// EditHex.cpp : implementation file // #include "stdafx.h" #include "EditHex.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CEditHex CEditHex::CEditHex() { } CEditHex::~CEditHex() { } BEGIN_MESSAGE_MAP(CEditHex, CEdit) //{{AFX_MSG_MAP(CEditHex) ON_WM_CHAR() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CEditHex message handlers void CEditHex::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default if(nChar != ' ') { if(isprint( nChar)) if(!isxdigit( nChar )) return; } CEdit::OnChar(nChar, nRepCnt, nFlags); }